Fermats theorem example